#!/usr/bin/env python

"""Server module, that encapsulate a connection to an IMAP4 or POP3 server.
   It implement the subset of the imaplib and poplib from the python library.
"""

__author__ = 'Yong Liu'
__version__ = '0.1'
__date__ = '2010-08-14'

from imaplib import IMAP4, IMAP4_SSL
from poplib import POP3, POP3_SSL

class SERVER:
    def connect(self, host = 'localhost', protocol = 'imap4', port = 143):
        if protocol == 'pop3':
